package com.lanou.elh.sysmanage.system_statistics.web.controller;
import com.lanou.elh.sysmanage.authority_management.common.Result;
import com.lanou.elh.sysmanage.authority_management.common.ResultUtil;
import com.lanou.elh.sysmanage.system_statistics.entity.*;
import com.lanou.elh.sysmanage.system_statistics.service.StatisticsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class StatisticsContorller {
    @Autowired
    private StatisticsService statisticsService;

    @GetMapping("/user/count/order")
    @ApiOperation(value = "销售量查询")
    public Result<Map<String,Object>> selectMoneyForYear(DataParamer dataParamer) {
        Map<String, Object> map = statisticsService.selectMoneyForYear(dataParamer);
        return new ResultUtil<Map<String,Object>>().setData(map);
    }

}
